package com.top.entities;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @Autor zhangjiawen
 * @Date: 2020/8/4 13:24
 */
@TableName("BLADE_LOG_USUAL")
public class LogUsual implements Serializable {
    private static final long serialVersionUID = 1L;
    @JsonSerialize(
            using = ToStringSerializer.class
    )
    @TableId(
            value = "id",
            type = IdType.ID_WORKER
    )
    private Long id;
    private String serviceId;
    private String serverHost;
    private String serverIp;
    private String env;
    private String logLevel;
    private String logId;
    private String logData;
    private String method;
    private String requestUri;
    private String userAgent;
    private String params;
    private String createBy;
    @DateTimeFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    private Date createTime;

    public LogUsual() {
    }

    public Long getId() {
        return this.id;
    }

    public String getServiceId() {
        return this.serviceId;
    }

    public String getServerHost() {
        return this.serverHost;
    }

    public String getServerIp() {
        return this.serverIp;
    }

    public String getEnv() {
        return this.env;
    }

    public String getLogLevel() {
        return this.logLevel;
    }

    public String getLogId() {
        return this.logId;
    }

    public String getLogData() {
        return this.logData;
    }

    public String getMethod() {
        return this.method;
    }

    public String getRequestUri() {
        return this.requestUri;
    }

    public String getUserAgent() {
        return this.userAgent;
    }

    public String getParams() {
        return this.params;
    }

    public String getCreateBy() {
        return this.createBy;
    }

    public Date getCreateTime() {
        return this.createTime;
    }

    public void setId(final Long id) {
        this.id = id;
    }

    public void setServiceId(final String serviceId) {
        this.serviceId = serviceId;
    }

    public void setServerHost(final String serverHost) {
        this.serverHost = serverHost;
    }

    public void setServerIp(final String serverIp) {
        this.serverIp = serverIp;
    }

    public void setEnv(final String env) {
        this.env = env;
    }

    public void setLogLevel(final String logLevel) {
        this.logLevel = logLevel;
    }

    public void setLogId(final String logId) {
        this.logId = logId;
    }

    public void setLogData(final String logData) {
        this.logData = logData;
    }

    public void setMethod(final String method) {
        this.method = method;
    }

    public void setRequestUri(final String requestUri) {
        this.requestUri = requestUri;
    }

    public void setUserAgent(final String userAgent) {
        this.userAgent = userAgent;
    }

    public void setParams(final String params) {
        this.params = params;
    }

    public void setCreateBy(final String createBy) {
        this.createBy = createBy;
    }

    public void setCreateTime(final Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof LogUsual)) {
            return false;
        } else {
            LogUsual other = (LogUsual) o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                Object this$id = this.getId();
                Object other$id = other.getId();
                if (this$id == null) {
                    if (other$id != null) {
                        return false;
                    }
                } else if (!this$id.equals(other$id)) {
                    return false;
                }

                Object this$serviceId = this.getServiceId();
                Object other$serviceId = other.getServiceId();
                if (this$serviceId == null) {
                    if (other$serviceId != null) {
                        return false;
                    }
                } else if (!this$serviceId.equals(other$serviceId)) {
                    return false;
                }

                Object this$serverHost = this.getServerHost();
                Object other$serverHost = other.getServerHost();
                if (this$serverHost == null) {
                    if (other$serverHost != null) {
                        return false;
                    }
                } else if (!this$serverHost.equals(other$serverHost)) {
                    return false;
                }

                label158:
                {
                    Object this$serverIp = this.getServerIp();
                    Object other$serverIp = other.getServerIp();
                    if (this$serverIp == null) {
                        if (other$serverIp == null) {
                            break label158;
                        }
                    } else if (this$serverIp.equals(other$serverIp)) {
                        break label158;
                    }

                    return false;
                }

                label151:
                {
                    Object this$env = this.getEnv();
                    Object other$env = other.getEnv();
                    if (this$env == null) {
                        if (other$env == null) {
                            break label151;
                        }
                    } else if (this$env.equals(other$env)) {
                        break label151;
                    }

                    return false;
                }

                Object this$logLevel = this.getLogLevel();
                Object other$logLevel = other.getLogLevel();
                if (this$logLevel == null) {
                    if (other$logLevel != null) {
                        return false;
                    }
                } else if (!this$logLevel.equals(other$logLevel)) {
                    return false;
                }

                label137:
                {
                    Object this$logId = this.getLogId();
                    Object other$logId = other.getLogId();
                    if (this$logId == null) {
                        if (other$logId == null) {
                            break label137;
                        }
                    } else if (this$logId.equals(other$logId)) {
                        break label137;
                    }

                    return false;
                }

                label130:
                {
                    Object this$logData = this.getLogData();
                    Object other$logData = other.getLogData();
                    if (this$logData == null) {
                        if (other$logData == null) {
                            break label130;
                        }
                    } else if (this$logData.equals(other$logData)) {
                        break label130;
                    }

                    return false;
                }

                Object this$method = this.getMethod();
                Object other$method = other.getMethod();
                if (this$method == null) {
                    if (other$method != null) {
                        return false;
                    }
                } else if (!this$method.equals(other$method)) {
                    return false;
                }

                Object this$requestUri = this.getRequestUri();
                Object other$requestUri = other.getRequestUri();
                if (this$requestUri == null) {
                    if (other$requestUri != null) {
                        return false;
                    }
                } else if (!this$requestUri.equals(other$requestUri)) {
                    return false;
                }

                label109:
                {
                    Object this$userAgent = this.getUserAgent();
                    Object other$userAgent = other.getUserAgent();
                    if (this$userAgent == null) {
                        if (other$userAgent == null) {
                            break label109;
                        }
                    } else if (this$userAgent.equals(other$userAgent)) {
                        break label109;
                    }

                    return false;
                }

                label102:
                {
                    Object this$params = this.getParams();
                    Object other$params = other.getParams();
                    if (this$params == null) {
                        if (other$params == null) {
                            break label102;
                        }
                    } else if (this$params.equals(other$params)) {
                        break label102;
                    }

                    return false;
                }

                Object this$createBy = this.getCreateBy();
                Object other$createBy = other.getCreateBy();
                if (this$createBy == null) {
                    if (other$createBy != null) {
                        return false;
                    }
                } else if (!this$createBy.equals(other$createBy)) {
                    return false;
                }

                Object this$createTime = this.getCreateTime();
                Object other$createTime = other.getCreateTime();
                if (this$createTime == null) {
                    if (other$createTime != null) {
                        return false;
                    }
                } else if (!this$createTime.equals(other$createTime)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof LogUsual;
    }



    @Override
    public String toString() {
        return "LogUsual(id=" + this.getId() + ", serviceId=" + this.getServiceId() + ", serverHost=" + this.getServerHost() + ", serverIp=" + this.getServerIp() + ", env=" + this.getEnv() + ", logLevel=" + this.getLogLevel() + ", logId=" + this.getLogId() + ", logData=" + this.getLogData() + ", method=" + this.getMethod() + ", requestUri=" + this.getRequestUri() + ", userAgent=" + this.getUserAgent() + ", params=" + this.getParams() + ", createBy=" + this.getCreateBy() + ", createTime=" + this.getCreateTime() + ")";
    }
}